/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @endpointRule = 'regional';
  @endpointMap = {
    ap-northeast-1 = 'companyreg.aliyuncs.com',
    ap-northeast-2-pop = 'companyreg.aliyuncs.com',
    ap-south-1 = 'companyreg.aliyuncs.com',
    ap-southeast-1 = 'companyreg.aliyuncs.com',
    ap-southeast-2 = 'companyreg.aliyuncs.com',
    ap-southeast-3 = 'companyreg.aliyuncs.com',
    ap-southeast-5 = 'companyreg.aliyuncs.com',
    cn-beijing = 'companyreg.aliyuncs.com',
    cn-beijing-finance-1 = 'companyreg.aliyuncs.com',
    cn-beijing-finance-pop = 'companyreg.aliyuncs.com',
    cn-beijing-gov-1 = 'companyreg.aliyuncs.com',
    cn-beijing-nu16-b01 = 'companyreg.aliyuncs.com',
    cn-chengdu = 'companyreg.aliyuncs.com',
    cn-edge-1 = 'companyreg.aliyuncs.com',
    cn-fujian = 'companyreg.aliyuncs.com',
    cn-haidian-cm12-c01 = 'companyreg.aliyuncs.com',
    cn-hangzhou-bj-b01 = 'companyreg.aliyuncs.com',
    cn-hangzhou-finance = 'companyreg.aliyuncs.com',
    cn-hangzhou-internal-prod-1 = 'companyreg.aliyuncs.com',
    cn-hangzhou-internal-test-1 = 'companyreg.aliyuncs.com',
    cn-hangzhou-internal-test-2 = 'companyreg.aliyuncs.com',
    cn-hangzhou-internal-test-3 = 'companyreg.aliyuncs.com',
    cn-hangzhou-test-306 = 'companyreg.aliyuncs.com',
    cn-hongkong = 'companyreg.aliyuncs.com',
    cn-hongkong-finance-pop = 'companyreg.aliyuncs.com',
    cn-huhehaote = 'companyreg.aliyuncs.com',
    cn-huhehaote-nebula-1 = 'companyreg.aliyuncs.com',
    cn-north-2-gov-1 = 'companyreg.aliyuncs.com',
    cn-qingdao = 'companyreg.aliyuncs.com',
    cn-qingdao-nebula = 'companyreg.aliyuncs.com',
    cn-shanghai = 'companyreg.aliyuncs.com',
    cn-shanghai-et15-b01 = 'companyreg.aliyuncs.com',
    cn-shanghai-et2-b01 = 'companyreg.aliyuncs.com',
    cn-shanghai-finance-1 = 'companyreg.aliyuncs.com',
    cn-shanghai-inner = 'companyreg.aliyuncs.com',
    cn-shanghai-internal-test-1 = 'companyreg.aliyuncs.com',
    cn-shenzhen = 'companyreg.aliyuncs.com',
    cn-shenzhen-finance-1 = 'companyreg.aliyuncs.com',
    cn-shenzhen-inner = 'companyreg.aliyuncs.com',
    cn-shenzhen-st4-d01 = 'companyreg.aliyuncs.com',
    cn-shenzhen-su18-b01 = 'companyreg.aliyuncs.com',
    cn-wuhan = 'companyreg.aliyuncs.com',
    cn-wulanchabu = 'companyreg.aliyuncs.com',
    cn-yushanfang = 'companyreg.aliyuncs.com',
    cn-zhangbei = 'companyreg.aliyuncs.com',
    cn-zhangbei-na61-b01 = 'companyreg.aliyuncs.com',
    cn-zhangjiakou = 'companyreg.aliyuncs.com',
    cn-zhangjiakou-na62-a01 = 'companyreg.aliyuncs.com',
    cn-zhengzhou-nebula-1 = 'companyreg.aliyuncs.com',
    eu-central-1 = 'companyreg.aliyuncs.com',
    eu-west-1 = 'companyreg.aliyuncs.com',
    eu-west-1-oxs = 'companyreg.aliyuncs.com',
    me-east-1 = 'companyreg.aliyuncs.com',
    rus-west-1-pop = 'companyreg.aliyuncs.com',
    us-east-1 = 'companyreg.aliyuncs.com',
    us-west-1 = 'companyreg.aliyuncs.com',
  };

  checkConfig(config);
  @endpoint = getEndpoint('companyreg', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model BindProduceAuthorizationRequest {
  authorizedUserIds?: string(name='AuthorizedUserIds', example='1219541161213057,1219541161213059'),
  bizId?: string(name='BizId', example='P20210815211849000001'),
  bizType?: string(name='BizType', example='esp.bookkeeping_ai'),
}

model BindProduceAuthorizationResponseBody = {
  data?: {
    authorizedUserList?: [ 
      {
        accountValidType?: int32(name='AccountValidType', example='2'),
        userId?: string(name='UserId', example='1219541161213058'),
        userName?: string(name='UserName', example='test@alibaba-inc.com'),
      }
    ](name='AuthorizedUserList'),
    message?: string(name='Message'),
    success?: boolean(name='Success', example='false'),
  }(name='Data'),
  errorCode?: string(name='ErrorCode', example='200'),
  errorMsg?: string(name='ErrorMsg'),
  requestId?: string(name='RequestId', example='AC492C5D-29D0-5103-9271-2C3A9D99F5CA'),
}

model BindProduceAuthorizationResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: BindProduceAuthorizationResponseBody(name='body'),
}

async function bindProduceAuthorizationWithOptions(request: BindProduceAuthorizationRequest, runtime: Util.RuntimeOptions): BindProduceAuthorizationResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.authorizedUserIds)) {
    body['AuthorizedUserIds'] = request.authorizedUserIds;
  }
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizType)) {
    body['BizType'] = request.bizType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'BindProduceAuthorization',
    version = '2020-03-06',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function bindProduceAuthorization(request: BindProduceAuthorizationRequest): BindProduceAuthorizationResponse {
  var runtime = new Util.RuntimeOptions{};
  return bindProduceAuthorizationWithOptions(request, runtime);
}

model CloseIntentionForPartnerRequest {
  bizType?: string(name='BizType', example='esp.beian_assist'),
  intentionBizId?: string(name='IntentionBizId', example='I20211105230733000001'),
  note?: string(name='Note'),
}

model CloseIntentionForPartnerResponseBody = {
  errorCode?: string(name='ErrorCode', example='NoPermission'),
  errorMsg?: string(name='ErrorMsg'),
  requestId?: string(name='RequestId', example='4674B06A-B57F-5922-890C-D23D17C5BD21'),
  success?: boolean(name='Success', example='True'),
}

model CloseIntentionForPartnerResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CloseIntentionForPartnerResponseBody(name='body'),
}

async function closeIntentionForPartnerWithOptions(request: CloseIntentionForPartnerRequest, runtime: Util.RuntimeOptions): CloseIntentionForPartnerResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizType)) {
    query['BizType'] = request.bizType;
  }
  if (!Util.isUnset(request.intentionBizId)) {
    query['IntentionBizId'] = request.intentionBizId;
  }
  if (!Util.isUnset(request.note)) {
    query['Note'] = request.note;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CloseIntentionForPartner',
    version = '2020-03-06',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function closeIntentionForPartner(request: CloseIntentionForPartnerRequest): CloseIntentionForPartnerResponse {
  var runtime = new Util.RuntimeOptions{};
  return closeIntentionForPartnerWithOptions(request, runtime);
}

model CloseUserIntentionRequest {
  bizType?: string(name='BizType', example='esp.bookkeeping'),
  intentionBizId?: string(name='IntentionBizId', example='I20201027162033000001'),
  note?: string(name='Note'),
}

model CloseUserIntentionResponseBody = {
  errorCode?: string(name='ErrorCode', example='NoPermission'),
  errorMsg?: string(name='ErrorMsg'),
  requestId?: string(name='RequestId', example='DD5639FF-1240-51DE-9BA8-2075670A1EAC'),
  success?: boolean(name='Success', example='True'),
}

model CloseUserIntentionResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CloseUserIntentionResponseBody(name='body'),
}

async function closeUserIntentionWithOptions(request: CloseUserIntentionRequest, runtime: Util.RuntimeOptions): CloseUserIntentionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizType)) {
    query['BizType'] = request.bizType;
  }
  if (!Util.isUnset(request.intentionBizId)) {
    query['IntentionBizId'] = request.intentionBizId;
  }
  if (!Util.isUnset(request.note)) {
    query['Note'] = request.note;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CloseUserIntention',
    version = '2020-03-06',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function closeUserIntention(request: CloseUserIntentionRequest): CloseUserIntentionResponse {
  var runtime = new Util.RuntimeOptions{};
  return closeUserIntentionWithOptions(request, runtime);
}

model CreateBusinessOpportunityRequest {
  bizType?: string(name='BizType', example='esp.hightech'),
  contactName?: string(name='ContactName'),
  mobile?: string(name='Mobile', example='18704330000'),
  source?: int32(name='Source'),
  VCode?: string(name='VCode', example='345674'),
}

model CreateBusinessOpportunityResponseBody = {
  errorCode?: string(name='ErrorCode', example='NoPermission'),
  errorMessage?: string(name='ErrorMessage'),
  requestId?: string(name='RequestId', example='6A603AA0-73BA-52B3-AC7D-0F846ECF7A9D'),
  success?: boolean(name='Success', example='True'),
}

model CreateBusinessOpportunityResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateBusinessOpportunityResponseBody(name='body'),
}

async function createBusinessOpportunityWithOptions(request: CreateBusinessOpportunityRequest, runtime: Util.RuntimeOptions): CreateBusinessOpportunityResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizType)) {
    query['BizType'] = request.bizType;
  }
  if (!Util.isUnset(request.contactName)) {
    query['ContactName'] = request.contactName;
  }
  if (!Util.isUnset(request.mobile)) {
    query['Mobile'] = request.mobile;
  }
  if (!Util.isUnset(request.source)) {
    query['Source'] = request.source;
  }
  if (!Util.isUnset(request.VCode)) {
    query['VCode'] = request.VCode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateBusinessOpportunity',
    version = '2020-03-06',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createBusinessOpportunity(request: CreateBusinessOpportunityRequest): CreateBusinessOpportunityResponse {
  var runtime = new Util.RuntimeOptions{};
  return createBusinessOpportunityWithOptions(request, runtime);
}

model CreateProduceForPartnerRequest {
  bizId?: string(name='BizId', example='P20210301102840000001'),
  bizType?: string(name='BizType', example='esp.hightech'),
  extInfo?: string(name='ExtInfo'),
}

model CreateProduceForPartnerResponseBody = {
  bizId?: string(name='BizId', example='P20210208152920000001'),
  errorCode?: string(name='ErrorCode', example='NoPermission'),
  errorMsg?: string(name='ErrorMsg'),
  requestId?: string(name='RequestId', example='2174AA97-56FB-50FA-B243-0460B9E4CE0C'),
  success?: boolean(name='Success', example='True'),
}

model CreateProduceForPartnerResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateProduceForPartnerResponseBody(name='body'),
}

async function createProduceForPartnerWithOptions(request: CreateProduceForPartnerRequest, runtime: Util.RuntimeOptions): CreateProduceForPartnerResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizType)) {
    query['BizType'] = request.bizType;
  }
  if (!Util.isUnset(request.extInfo)) {
    query['ExtInfo'] = request.extInfo;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateProduceForPartner',
    version = '2020-03-06',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createProduceForPartner(request: CreateProduceForPartnerRequest): CreateProduceForPartnerResponse {
  var runtime = new Util.RuntimeOptions{};
  return createProduceForPartnerWithOptions(request, runtime);
}

model DescribePartnerConfigRequest {
  bizType?: string(name='BizType', example='esp.wangwen'),
  partnerCode?: string(name='PartnerCode', example='jinsan'),
}

model DescribePartnerConfigResponseBody = {
  contact?: string(name='Contact'),
  partnerCode?: string(name='PartnerCode', example='jinsan'),
  partnerName?: string(name='PartnerName'),
  requestId?: string(name='RequestId', example='8179A0B3-A5D3-52F4-8845-F0ABC3CC6783'),
}

model DescribePartnerConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribePartnerConfigResponseBody(name='body'),
}

async function describePartnerConfigWithOptions(request: DescribePartnerConfigRequest, runtime: Util.RuntimeOptions): DescribePartnerConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizType)) {
    query['BizType'] = request.bizType;
  }
  if (!Util.isUnset(request.partnerCode)) {
    query['PartnerCode'] = request.partnerCode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribePartnerConfig',
    version = '2020-03-06',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describePartnerConfig(request: DescribePartnerConfigRequest): DescribePartnerConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return describePartnerConfigWithOptions(request, runtime);
}

model GenerateUploadFilePolicyRequest {
  bizType?: string(name='BizType', example='esp.isp'),
  fileName?: string(name='FileName'),
  fileType?: string(name='FileType', example='company_apply_business_license'),
}

model GenerateUploadFilePolicyResponseBody = {
  accessId?: string(name='AccessId', description='OSSAccessKeyId', example='hObpgEXoca42qH3V'),
  encodedPolicy?: string(name='EncodedPolicy', example='eyJleHBpcmF0aW9uIjoiMjAyMS0xMi0wNlQwNjoxOTowMi40MjdaIiwiY29uZGl0aW9ucyI6W1siZXEiLCIkYnVja2V0IiwibXNlYS1jYWlzaHVpIl1dfQ=='),
  expireTime?: string(name='ExpireTime', example='1638169824405'),
  fileDir?: string(name='FileDir', example='company_apply_card/company_change_city/1577930895198750/1638170049657'),
  fileUrl?: string(name='FileUrl', example='https://'),
  host?: string(name='Host', description='OSS Endpoint。', example='//companyapply.oss-cn-zhangjiakou.aliyuncs.com/'),
  requestId?: string(name='RequestId', example='EB809CAB-82F7-5843-A42F-356770CD4914'),
  signature?: string(name='Signature', example='jykxhmskIF24sLlxc1GafU/eQMU='),
}

model GenerateUploadFilePolicyResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GenerateUploadFilePolicyResponseBody(name='body'),
}

async function generateUploadFilePolicyWithOptions(request: GenerateUploadFilePolicyRequest, runtime: Util.RuntimeOptions): GenerateUploadFilePolicyResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizType)) {
    query['BizType'] = request.bizType;
  }
  if (!Util.isUnset(request.fileName)) {
    query['FileName'] = request.fileName;
  }
  if (!Util.isUnset(request.fileType)) {
    query['FileType'] = request.fileType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GenerateUploadFilePolicy',
    version = '2020-03-06',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function generateUploadFilePolicy(request: GenerateUploadFilePolicyRequest): GenerateUploadFilePolicyResponse {
  var runtime = new Util.RuntimeOptions{};
  return generateUploadFilePolicyWithOptions(request, runtime);
}

model GetAlipayUrlRequest {
  bizType?: string(name='BizType', example='esp.beian_assist'),
  orderId?: long(name='OrderId', example='206129201170307'),
  returnUrl?: string(name='ReturnUrl', example='https://nfyt.lzsgtghchy.com:502/sigin/'),
  type?: string(name='Type', example='web'),
}

model GetAlipayUrlResponseBody = {
  data?: string(name='Data', example='https://'),
  requestId?: string(name='RequestId', example='2174AA97-56FB-50FA-B243-0460B9E4CE0C'),
}

model GetAlipayUrlResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetAlipayUrlResponseBody(name='body'),
}

async function getAlipayUrlWithOptions(request: GetAlipayUrlRequest, runtime: Util.RuntimeOptions): GetAlipayUrlResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetAlipayUrl',
    version = '2020-03-06',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getAlipayUrl(request: GetAlipayUrlRequest): GetAlipayUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return getAlipayUrlWithOptions(request, runtime);
}

model ListIntentionNoteRequest {
  beginTime?: long(name='BeginTime', example='1640456765459'),
  endTime?: long(name='EndTime', example='1631635199999'),
  intentionBizId?: string(name='IntentionBizId', example='I20210420142416000001'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
}

model ListIntentionNoteResponseBody = {
  currentPageNum?: int32(name='CurrentPageNum', example='0'),
  data?: [ 
    {
      createTime?: string(name='CreateTime', example='2022-01-25 10:21:38'),
      intentionBizId?: string(name='IntentionBizId', example='I20210420142416000001'),
      note?: string(name='Note'),
      source?: int32(name='Source', example='1'),
      type?: string(name='Type', example='1'),
    }
  ](name='Data'),
  pageSize?: int32(name='PageSize', example='10'),
  requestId?: string(name='RequestId', example='6A603AA0-73BA-52B3-AC7D-0F846ECF7A9D'),
  totalItemNum?: int32(name='TotalItemNum', example='3'),
  totalPageNum?: int32(name='TotalPageNum', example='1'),
}

model ListIntentionNoteResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListIntentionNoteResponseBody(name='body'),
}

async function listIntentionNoteWithOptions(request: ListIntentionNoteRequest, runtime: Util.RuntimeOptions): ListIntentionNoteResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.beginTime)) {
    query['BeginTime'] = request.beginTime;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.intentionBizId)) {
    query['IntentionBizId'] = request.intentionBizId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListIntentionNote',
    version = '2020-03-06',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listIntentionNote(request: ListIntentionNoteRequest): ListIntentionNoteResponse {
  var runtime = new Util.RuntimeOptions{};
  return listIntentionNoteWithOptions(request, runtime);
}

model ListProduceAuthorizationRequest {
  bizId?: string(name='BizId', example='P20210709190452000001'),
  bizType?: string(name='BizType', example='esp.bookkeeping_ai'),
  pageNum?: int32(name='PageNum', example='1'),
  pageSize?: int32(name='PageSize', example='20'),
}

model ListProduceAuthorizationResponseBody = {
  currentPageNum?: int32(name='CurrentPageNum', example='1'),
  data?: [ 
    {
      authorizedUserId?: string(name='AuthorizedUserId', example='12195411612139999'),
      authorizedUserName?: string(name='AuthorizedUserName', example='test@alibaba-inc.com'),
    }
  ](name='Data'),
  pageSize?: int32(name='PageSize', example='20'),
  requestId?: string(name='RequestId', example='10AAC56B-C512-5860-9A9E-B949431E7174'),
  success?: boolean(name='Success', example='True'),
  totalItemNum?: int32(name='TotalItemNum', example='292'),
  totalPageNum?: int32(name='TotalPageNum', example='27'),
}

model ListProduceAuthorizationResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListProduceAuthorizationResponseBody(name='body'),
}

async function listProduceAuthorizationWithOptions(request: ListProduceAuthorizationRequest, runtime: Util.RuntimeOptions): ListProduceAuthorizationResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizType)) {
    query['BizType'] = request.bizType;
  }
  if (!Util.isUnset(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListProduceAuthorization',
    version = '2020-03-06',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listProduceAuthorization(request: ListProduceAuthorizationRequest): ListProduceAuthorizationResponse {
  var runtime = new Util.RuntimeOptions{};
  return listProduceAuthorizationWithOptions(request, runtime);
}

model ListUserDetailSolutionsRequest {
  bizType?: string(name='BizType', example='esp.wangwen'),
  intentionBizId?: string(name='IntentionBizId', example='I20211222161651000001'),
  pageNum?: int32(name='PageNum', example='1'),
  pageSize?: int32(name='PageSize', example='20'),
}

model ListUserDetailSolutionsResponseBody = {
  currentPageNum?: int32(name='CurrentPageNum', example='5'),
  data?: [ 
    {
      bizId?: string(name='BizId', example='S20211222161651000001'),
      bizType?: string(name='BizType', example='esp.wangwen'),
      createTime?: long(name='CreateTime', example='15556223433'),
      deliveryOrderBizId?: string(name='DeliveryOrderBizId', example='P20211222161651000001'),
      extInfo?: string(name='ExtInfo', example='{}'),
      intentionAssignBizId?: string(name='IntentionAssignBizId', example='A20211222161651000001'),
      intentionBizId?: string(name='IntentionBizId', example='I20211222161651000001'),
      partnerCode?: string(name='PartnerCode', example='jinsan'),
      reason?: string(name='Reason'),
      status?: int32(name='Status', example='1'),
      updateTime?: long(name='UpdateTime', example='15556223433'),
      userId?: string(name='UserId', example='1219541161213057'),
    }
  ](name='Data'),
  pageSize?: int32(name='PageSize', example='20'),
  requestId?: string(name='RequestId', example='2174AA97-56FB-50FA-B243-0460B9E4CE0C'),
  totalItemNum?: int32(name='TotalItemNum', example='1'),
  totalPageNum?: int32(name='TotalPageNum', example='1'),
}

model ListUserDetailSolutionsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListUserDetailSolutionsResponseBody(name='body'),
}

async function listUserDetailSolutionsWithOptions(request: ListUserDetailSolutionsRequest, runtime: Util.RuntimeOptions): ListUserDetailSolutionsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizType)) {
    query['BizType'] = request.bizType;
  }
  if (!Util.isUnset(request.intentionBizId)) {
    query['IntentionBizId'] = request.intentionBizId;
  }
  if (!Util.isUnset(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListUserDetailSolutions',
    version = '2020-03-06',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listUserDetailSolutions(request: ListUserDetailSolutionsRequest): ListUserDetailSolutionsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listUserDetailSolutionsWithOptions(request, runtime);
}

model ListUserIntentionNotesRequest {
  bizType?: string(name='BizType', example='esp.beian_assist'),
  intentionBizId?: string(name='IntentionBizId', example='I20210912102942000001'),
  pageNum?: int32(name='PageNum', example='1'),
  pageSize?: int32(name='PageSize', example='20'),
}

model ListUserIntentionNotesResponseBody = {
  data?: [ 
    {
      createTime?: string(name='CreateTime', example='2022-01-25 10:21:38'),
      note?: string(name='Note'),
    }
  ](name='Data'),
  pageNum?: int32(name='PageNum', example='1'),
  pageSize?: int32(name='PageSize', example='20'),
  requestId?: string(name='RequestId', example='5D8BD6E8-28D9-5451-BBA1-3D3DCA6971F6'),
  success?: boolean(name='Success', example='True'),
  totalItemNum?: int32(name='TotalItemNum', example='8'),
  totalPageNum?: int32(name='TotalPageNum', example='1'),
}

model ListUserIntentionNotesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListUserIntentionNotesResponseBody(name='body'),
}

async function listUserIntentionNotesWithOptions(request: ListUserIntentionNotesRequest, runtime: Util.RuntimeOptions): ListUserIntentionNotesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizType)) {
    query['BizType'] = request.bizType;
  }
  if (!Util.isUnset(request.intentionBizId)) {
    query['IntentionBizId'] = request.intentionBizId;
  }
  if (!Util.isUnset(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListUserIntentionNotes',
    version = '2020-03-06',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listUserIntentionNotes(request: ListUserIntentionNotesRequest): ListUserIntentionNotesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listUserIntentionNotesWithOptions(request, runtime);
}

model ListUserIntentionsRequest {
  area?: string(name='Area'),
  bizType?: string(name='BizType', example='esp.companyreg_cloud'),
  bizTypes?: string(name='BizTypes', example='esp.bookkeeping,esp.bookkeeping_cloud'),
  intentionBizId?: string(name='IntentionBizId', example='I20210917170147000001'),
  pageNum?: int32(name='PageNum', example='1'),
  pageSize?: int32(name='PageSize', example='20'),
  sortFiled?: string(name='SortFiled', example='UpdateTime'),
  sortOrder?: string(name='SortOrder', example='desc'),
  status?: int32(name='Status', example='37'),
  withExtInfo?: boolean(name='WithExtInfo'),
}

model ListUserIntentionsResponseBody = {
  currentPageNum?: int32(name='CurrentPageNum', example='1'),
  data?: [ 
    {
      area?: string(name='Area'),
      bizId?: string(name='BizId', example='I100000033443'),
      bizType?: string(name='BizType', example='esp.lgo'),
      contactName?: string(name='ContactName'),
      createTime?: long(name='CreateTime', example='2022-01-24 15:43:58'),
      description?: string(name='Description'),
      ext?: string(name='Ext'),
      mobile?: string(name='Mobile', example='18000000000'),
      reason?: string(name='Reason'),
      status?: int32(name='Status', example='1'),
      updateTime?: long(name='UpdateTime', example='2022-01-24 15:43:58'),
      userId?: string(name='UserId', example='1219541161213057'),
    }
  ](name='Data'),
  pageSize?: int32(name='PageSize', example='20'),
  requestId?: string(name='RequestId', example='2174AA97-56FB-50FA-B243-0460B9E4CE0C'),
  totalItemNum?: int32(name='TotalItemNum', example='2'),
  totalPageNum?: int32(name='TotalPageNum', example='1'),
}

model ListUserIntentionsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListUserIntentionsResponseBody(name='body'),
}

async function listUserIntentionsWithOptions(request: ListUserIntentionsRequest, runtime: Util.RuntimeOptions): ListUserIntentionsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.area)) {
    query['Area'] = request.area;
  }
  if (!Util.isUnset(request.bizType)) {
    query['BizType'] = request.bizType;
  }
  if (!Util.isUnset(request.bizTypes)) {
    query['BizTypes'] = request.bizTypes;
  }
  if (!Util.isUnset(request.intentionBizId)) {
    query['IntentionBizId'] = request.intentionBizId;
  }
  if (!Util.isUnset(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.sortFiled)) {
    query['SortFiled'] = request.sortFiled;
  }
  if (!Util.isUnset(request.sortOrder)) {
    query['SortOrder'] = request.sortOrder;
  }
  if (!Util.isUnset(request.status)) {
    query['Status'] = request.status;
  }
  if (!Util.isUnset(request.withExtInfo)) {
    query['WithExtInfo'] = request.withExtInfo;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListUserIntentions',
    version = '2020-03-06',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listUserIntentions(request: ListUserIntentionsRequest): ListUserIntentionsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listUserIntentionsWithOptions(request, runtime);
}

model ListUserProduceOperateLogsRequest {
  bizId?: string(name='BizId', example='P20210928095324000002'),
  bizType?: string(name='BizType', example='esp.wangwen'),
  pageNum?: int32(name='PageNum', example='1'),
  pageSize?: int32(name='PageSize', example='20'),
}

model ListUserProduceOperateLogsResponseBody = {
  data?: [ 
    {
      bizId?: string(name='BizId', example='P20210928095324000002'),
      bizStatus?: int32(name='BizStatus', example='10'),
      bizType?: string(name='BizType', example='esp.wangwen'),
      note?: string(name='Note'),
      operateName?: string(name='OperateName'),
      operateTime?: long(name='OperateTime', example='1695324000002'),
      operateUserType?: string(name='OperateUserType', example='user'),
      toBizStatus?: int32(name='ToBizStatus', example='35'),
    }
  ](name='Data'),
  pageNum?: int32(name='PageNum', example='1'),
  pageSize?: int32(name='PageSize', example='20'),
  requestId?: string(name='RequestId', example='0DCBE2FF-2DFC-56DC-9A15-BDF27B7FFB1B'),
  success?: boolean(name='Success', example='True'),
  totalItemNum?: int32(name='TotalItemNum', example='6'),
  totalPageNum?: int32(name='TotalPageNum', example='23'),
}

model ListUserProduceOperateLogsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListUserProduceOperateLogsResponseBody(name='body'),
}

async function listUserProduceOperateLogsWithOptions(request: ListUserProduceOperateLogsRequest, runtime: Util.RuntimeOptions): ListUserProduceOperateLogsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizType)) {
    query['BizType'] = request.bizType;
  }
  if (!Util.isUnset(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListUserProduceOperateLogs',
    version = '2020-03-06',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listUserProduceOperateLogs(request: ListUserProduceOperateLogsRequest): ListUserProduceOperateLogsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listUserProduceOperateLogsWithOptions(request, runtime);
}

model ListUserSolutionsRequest {
  existStatus?: [ long ](name='ExistStatus'),
  intentionBizId?: string(name='IntentionBizId', example='I20210924151843000001'),
  pageNum?: int32(name='PageNum', example='1'),
  pageSize?: int32(name='PageSize', example='20'),
}

model ListUserSolutionsShrinkRequest {
  existStatusShrink?: string(name='ExistStatus'),
  intentionBizId?: string(name='IntentionBizId', example='I20210924151843000001'),
  pageNum?: int32(name='PageNum', example='1'),
  pageSize?: int32(name='PageSize', example='20'),
}

model ListUserSolutionsResponseBody = {
  currentPageNum?: int32(name='CurrentPageNum', example='8'),
  data?: [ 
    {
      bizId?: string(name='BizId', example='S20210924151843000001'),
      bizType?: string(name='BizType', example='esp.logo'),
      createTime?: long(name='CreateTime', example='164454443222'),
      deliveryOrderBizId?: string(name='DeliveryOrderBizId', example='P20210924151843000001'),
      intentionAssignBizId?: string(name='IntentionAssignBizId', example='A20210924151843000001'),
      intentionBizId?: string(name='IntentionBizId', example='I20210924151843000001'),
      partnerCode?: string(name='PartnerCode', example='jinsan'),
      reason?: string(name='Reason'),
      status?: int32(name='Status', example='1'),
      updateTime?: long(name='UpdateTime', example='164454443222'),
      userId?: string(name='UserId', example='1219541161213057'),
    }
  ](name='Data'),
  pageSize?: int32(name='PageSize', example='20'),
  requestId?: string(name='RequestId', example='2174AA97-56FB-50FA-B243-0460B9E4CE0C'),
  totalItemNum?: int32(name='TotalItemNum', example='344'),
  totalPageNum?: int32(name='TotalPageNum', example='1'),
}

model ListUserSolutionsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListUserSolutionsResponseBody(name='body'),
}

async function listUserSolutionsWithOptions(tmpReq: ListUserSolutionsRequest, runtime: Util.RuntimeOptions): ListUserSolutionsResponse {
  Util.validateModel(tmpReq);
  var request = new ListUserSolutionsShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.existStatus)) {
    request.existStatusShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.existStatus, 'ExistStatus', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.existStatusShrink)) {
    query['ExistStatus'] = request.existStatusShrink;
  }
  if (!Util.isUnset(request.intentionBizId)) {
    query['IntentionBizId'] = request.intentionBizId;
  }
  if (!Util.isUnset(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListUserSolutions',
    version = '2020-03-06',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listUserSolutions(request: ListUserSolutionsRequest): ListUserSolutionsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listUserSolutionsWithOptions(request, runtime);
}

model OperateProduceForPartnerRequest {
  bizId?: string(name='BizId', example='P20210930105636000001'),
  bizType?: string(name='BizType', example='esp.beian_assist'),
  extInfo?: string(name='ExtInfo', example='{\\"beianServiceNumber\\":\\"9969c666-0935-4c5b-8042-926ff546e39f\\"}'),
  operateType?: string(name='OperateType', example='CERT_MATERIAL_SUBMITTED'),
}

model OperateProduceForPartnerResponseBody = {
  errorCode?: string(name='ErrorCode', example='NoPermission'),
  errorMsg?: string(name='ErrorMsg'),
  requestId?: string(name='RequestId', example='D170A4BA-4528-5E07-B8D5-6449C42EC23F'),
  success?: boolean(name='Success', example='True'),
}

model OperateProduceForPartnerResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: OperateProduceForPartnerResponseBody(name='body'),
}

async function operateProduceForPartnerWithOptions(request: OperateProduceForPartnerRequest, runtime: Util.RuntimeOptions): OperateProduceForPartnerResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizType)) {
    query['BizType'] = request.bizType;
  }
  if (!Util.isUnset(request.extInfo)) {
    query['ExtInfo'] = request.extInfo;
  }
  if (!Util.isUnset(request.operateType)) {
    query['OperateType'] = request.operateType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'OperateProduceForPartner',
    version = '2020-03-06',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function operateProduceForPartner(request: OperateProduceForPartnerRequest): OperateProduceForPartnerResponse {
  var runtime = new Util.RuntimeOptions{};
  return operateProduceForPartnerWithOptions(request, runtime);
}

model PutMeasureDataRequest {
  bizType?: string(name='BizType', example='esp.sp'),
  data?: string(name='Data', example='[]'),
  dataType?: string(name='DataType', example='d'),
  endTime?: string(name='EndTime', example='1634019240000'),
  startTime?: string(name='StartTime', example='1640400574804'),
}

model PutMeasureDataResponseBody = {
  data?: boolean(name='Data', example='True'),
  requestId?: string(name='RequestId', example='6A603AA0-73BA-52B3-AC7D-0F846ECF7A9D'),
}

model PutMeasureDataResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: PutMeasureDataResponseBody(name='body'),
}

async function putMeasureDataWithOptions(request: PutMeasureDataRequest, runtime: Util.RuntimeOptions): PutMeasureDataResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizType)) {
    body['BizType'] = request.bizType;
  }
  if (!Util.isUnset(request.data)) {
    body['Data'] = request.data;
  }
  if (!Util.isUnset(request.dataType)) {
    body['DataType'] = request.dataType;
  }
  if (!Util.isUnset(request.endTime)) {
    body['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.startTime)) {
    body['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'PutMeasureData',
    version = '2020-03-06',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function putMeasureData(request: PutMeasureDataRequest): PutMeasureDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return putMeasureDataWithOptions(request, runtime);
}

model PutMeasureReadyFlagRequest {
  bizType?: string(name='BizType', example='esp.bookkeeping'),
  dataType?: string(name='DataType', example='d'),
  endTime?: string(name='EndTime', example='1634784240000'),
  readyFlag?: string(name='ReadyFlag', example='1'),
  startTime?: string(name='StartTime', example='1634969692175'),
}

model PutMeasureReadyFlagResponseBody = {
  data?: boolean(name='Data', example='True'),
  requestId?: string(name='RequestId', example='2174AA97-56FB-50FA-B243-0460B9E4CE0C'),
}

model PutMeasureReadyFlagResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: PutMeasureReadyFlagResponseBody(name='body'),
}

async function putMeasureReadyFlagWithOptions(request: PutMeasureReadyFlagRequest, runtime: Util.RuntimeOptions): PutMeasureReadyFlagResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizType)) {
    query['BizType'] = request.bizType;
  }
  if (!Util.isUnset(request.dataType)) {
    query['DataType'] = request.dataType;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.readyFlag)) {
    query['ReadyFlag'] = request.readyFlag;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'PutMeasureReadyFlag',
    version = '2020-03-06',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function putMeasureReadyFlag(request: PutMeasureReadyFlagRequest): PutMeasureReadyFlagResponse {
  var runtime = new Util.RuntimeOptions{};
  return putMeasureReadyFlagWithOptions(request, runtime);
}

model QueryAvailableNumbersRequest {
  bizType?: string(name='BizType', example='test'),
}

model QueryAvailableNumbersResponseBody = {
  data?: [ string ](name='Data'),
  errorCode?: string(name='ErrorCode', example='PARTNER.CONFIG.NOT.FOUND'),
  errorMsg?: string(name='ErrorMsg'),
  requestId?: string(name='RequestId', example='6A603AA0-73BA-52B3-AC7D-0F846ECF7A9D'),
  success?: boolean(name='Success', example='True'),
}

model QueryAvailableNumbersResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: QueryAvailableNumbersResponseBody(name='body'),
}

async function queryAvailableNumbersWithOptions(request: QueryAvailableNumbersRequest, runtime: Util.RuntimeOptions): QueryAvailableNumbersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizType)) {
    query['BizType'] = request.bizType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryAvailableNumbers',
    version = '2020-03-06',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryAvailableNumbers(request: QueryAvailableNumbersRequest): QueryAvailableNumbersResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryAvailableNumbersWithOptions(request, runtime);
}

model QueryBagRemainingRequest {
  bizType?: string(name='BizType', example='esp.hightech'),
}

model QueryBagRemainingResponseBody = {
  data?: long(name='Data', example='True'),
  requestId?: string(name='RequestId', example='6A603AA0-73BA-52B3-AC7D-0F846ECF7A9D'),
}

model QueryBagRemainingResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: QueryBagRemainingResponseBody(name='body'),
}

async function queryBagRemainingWithOptions(request: QueryBagRemainingRequest, runtime: Util.RuntimeOptions): QueryBagRemainingResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryBagRemaining',
    version = '2020-03-06',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryBagRemaining(request: QueryBagRemainingRequest): QueryBagRemainingResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryBagRemainingWithOptions(request, runtime);
}

model QueryCommodityConfigRequest {
  bizType?: string(name='BizType', example='esp.beian_assist'),
  commodityCode?: string(name='CommodityCode', example='companyreg_icpbutler_public_cn'),
  queryModule?: boolean(name='QueryModule'),
}

model QueryCommodityConfigResponseBody = {
  data?: {
    commodityCode?: string(name='CommodityCode', example='companyreg_icpbutler_public_cn'),
    commodityModules?: [ 
      {
        lxModuleCode?: string(name='LxModuleCode'),
        moduleCode?: string(name='ModuleCode'),
        moduleDescription?: string(name='ModuleDescription'),
        moduleName?: string(name='ModuleName'),
        moduleTip?: string(name='ModuleTip'),
        moduleType?: string(name='ModuleType'),
        moduleUrl?: string(name='ModuleUrl'),
        moduleValue?: string(name='ModuleValue'),
        sortNumber?: int32(name='SortNumber', example='0'),
      }
    ](name='CommodityModules'),
    description?: string(name='Description'),
    iconUrl?: string(name='IconUrl'),
    productLine?: string(name='ProductLine', example='companyreg'),
    protocolUrl?: string(name='ProtocolUrl'),
    startingPrice?: string(name='StartingPrice', example='0'),
    type?: int32(name='Type'),
  }(name='Data'),
  requestId?: string(name='RequestId', example='2174AA97-56FB-50FA-B243-0460B9E4CE0C'),
}

model QueryCommodityConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: QueryCommodityConfigResponseBody(name='body'),
}

async function queryCommodityConfigWithOptions(request: QueryCommodityConfigRequest, runtime: Util.RuntimeOptions): QueryCommodityConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizType)) {
    query['BizType'] = request.bizType;
  }
  if (!Util.isUnset(request.commodityCode)) {
    query['CommodityCode'] = request.commodityCode;
  }
  if (!Util.isUnset(request.queryModule)) {
    query['QueryModule'] = request.queryModule;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryCommodityConfig',
    version = '2020-03-06',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryCommodityConfig(request: QueryCommodityConfigRequest): QueryCommodityConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryCommodityConfigWithOptions(request, runtime);
}

model QueryInstanceRequest {
  bizType?: string(name='BizType', example='esp.bookkeeping'),
  instanceId?: string(name='InstanceId', example='T20210302164856000001'),
}

model QueryInstanceResponseBody = {
  data?: string(name='Data', example='{}'),
  requestId?: string(name='RequestId', example='2174AA97-56FB-50FA-B243-0460B9E4CE0C'),
}

model QueryInstanceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: QueryInstanceResponseBody(name='body'),
}

async function queryInstanceWithOptions(request: QueryInstanceRequest, runtime: Util.RuntimeOptions): QueryInstanceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizType)) {
    query['BizType'] = request.bizType;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryInstance',
    version = '2020-03-06',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryInstance(request: QueryInstanceRequest): QueryInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryInstanceWithOptions(request, runtime);
}

model QueryPartnerIntentionListRequest {
  bizId?: string(name='BizId', example='I20211117092704000001'),
  bizType?: string(name='BizType', example='esp.wangwen'),
  pageNum?: long(name='PageNum', example='10'),
  pageSize?: long(name='PageSize', example='20'),
}

model QueryPartnerIntentionListResponseBody = {
  currentPageNum?: long(name='CurrentPageNum', example='2'),
  data?: [ 
    {
      bizId?: string(name='BizId', example='I20211117092704000001'),
      bizType?: string(name='BizType', example='esp.wangwen'),
      mobile?: string(name='Mobile', example='18700000003'),
    }
  ](name='Data'),
  pageSize?: long(name='PageSize', example='20'),
  requestId?: string(name='RequestId', example='78E9DC76-7DFD-5975-99B0-4A95E8A92F5D'),
  totalItemNum?: long(name='TotalItemNum', example='319'),
  totalPageNum?: long(name='TotalPageNum', example='13'),
}

model QueryPartnerIntentionListResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: QueryPartnerIntentionListResponseBody(name='body'),
}

async function queryPartnerIntentionListWithOptions(request: QueryPartnerIntentionListRequest, runtime: Util.RuntimeOptions): QueryPartnerIntentionListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizType)) {
    query['BizType'] = request.bizType;
  }
  if (!Util.isUnset(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryPartnerIntentionList',
    version = '2020-03-06',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryPartnerIntentionList(request: QueryPartnerIntentionListRequest): QueryPartnerIntentionListResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryPartnerIntentionListWithOptions(request, runtime);
}

model QueryPartnerProduceListRequest {
  bizId?: string(name='BizId', example='P20211216204717000001'),
  bizType?: string(name='BizType', example='esp.cdn'),
  pageNum?: long(name='PageNum', example='1'),
  pageSize?: long(name='PageSize', example='20'),
}

model QueryPartnerProduceListResponseBody = {
  currentPageNum?: long(name='CurrentPageNum', example='1'),
  data?: [ 
    {
      bizId?: string(name='BizId', example='P20211216204717000001'),
      bizType?: string(name='BizType', example='esp.cdn'),
      mobile?: string(name='mobile', example='18600000001'),
    }
  ](name='Data'),
  pageSize?: long(name='PageSize', example='20'),
  requestId?: string(name='RequestId', example='1A13ABB5-7649-5031-B55C-D2E38F9F189D'),
  totalItemNum?: long(name='TotalItemNum', example='34'),
  totalPageNum?: long(name='TotalPageNum', example='1'),
}

model QueryPartnerProduceListResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: QueryPartnerProduceListResponseBody(name='body'),
}

async function queryPartnerProduceListWithOptions(request: QueryPartnerProduceListRequest, runtime: Util.RuntimeOptions): QueryPartnerProduceListResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryPartnerProduceList',
    version = '2020-03-06',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryPartnerProduceList(request: QueryPartnerProduceListRequest): QueryPartnerProduceListResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryPartnerProduceListWithOptions(request, runtime);
}

model QueryUserNeedAuthResponseBody = {
  needAuth?: boolean(name='NeedAuth', example='True'),
  requestId?: string(name='RequestId', example='2C859C36-886C-5BE7-A606-01F38A5374D6'),
  success?: boolean(name='Success', example='True'),
}

model QueryUserNeedAuthResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: QueryUserNeedAuthResponseBody(name='body'),
}

async function queryUserNeedAuthWithOptions(runtime: Util.RuntimeOptions): QueryUserNeedAuthResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'QueryUserNeedAuth',
    version = '2020-03-06',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryUserNeedAuth(): QueryUserNeedAuthResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryUserNeedAuthWithOptions(runtime);
}

model RecordPostBackRequest {
  bizId?: string(name='bizId', example='P111111111111'),
  bizType?: string(name='bizType', example='esp.zhangsan'),
  contactor?: string(name='contactor'),
  content?: string(name='content'),
  entityKey?: string(name='entityKey', example='esp_produce'),
}

model RecordPostBackResponseBody = {
  allowRetry?: boolean(name='AllowRetry', example='false'),
  appName?: string(name='AppName', example='esp-core-aliyun-com'),
  dynamicCode?: string(name='DynamicCode', example='PARAMETER.ILLEGAL'),
  dynamicMessage?: string(name='DynamicMessage'),
  errorArgs?: [ any ](name='ErrorArgs'),
  errorCode?: string(name='ErrorCode', example='PARAMETER.ILLEGAL'),
  errorMsg?: string(name='ErrorMsg'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  module?: boolean(name='Module', example='True'),
  requestId?: string(name='RequestId', example='B8E5CC4C-7563-19BD-B02F-DFFFD4E51D4A'),
  success?: boolean(name='Success', example='True'),
}

model RecordPostBackResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: RecordPostBackResponseBody(name='body'),
}

async function recordPostBackWithOptions(request: RecordPostBackRequest, runtime: Util.RuntimeOptions): RecordPostBackResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['bizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizType)) {
    query['bizType'] = request.bizType;
  }
  if (!Util.isUnset(request.contactor)) {
    query['contactor'] = request.contactor;
  }
  if (!Util.isUnset(request.content)) {
    query['content'] = request.content;
  }
  if (!Util.isUnset(request.entityKey)) {
    query['entityKey'] = request.entityKey;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RecordPostBack',
    version = '2020-03-06',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function recordPostBack(request: RecordPostBackRequest): RecordPostBackResponse {
  var runtime = new Util.RuntimeOptions{};
  return recordPostBackWithOptions(request, runtime);
}

model RejectSolutionRequest {
  note?: string(name='Note'),
  solutionBizId?: string(name='SolutionBizId', example='S20200512114050000001'),
}

model RejectSolutionResponseBody = {
  errorCode?: string(name='ErrorCode', example='PARTNER.CONFIG.NOT.FOUND'),
  errorMsg?: string(name='ErrorMsg'),
  requestId?: string(name='RequestId', example='2174AA97-56FB-50FA-B243-0460B9E4CE0C'),
  success?: boolean(name='Success', example='True'),
}

model RejectSolutionResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: RejectSolutionResponseBody(name='body'),
}

async function rejectSolutionWithOptions(request: RejectSolutionRequest, runtime: Util.RuntimeOptions): RejectSolutionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.note)) {
    query['Note'] = request.note;
  }
  if (!Util.isUnset(request.solutionBizId)) {
    query['SolutionBizId'] = request.solutionBizId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RejectSolution',
    version = '2020-03-06',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function rejectSolution(request: RejectSolutionRequest): RejectSolutionResponse {
  var runtime = new Util.RuntimeOptions{};
  return rejectSolutionWithOptions(request, runtime);
}

model RejectUserSolutionRequest {
  bizType?: string(name='BizType', example='esp.companyreg'),
  note?: string(name='Note'),
  solutionBizId?: string(name='SolutionBizId', example='S20211227151912000001'),
}

model RejectUserSolutionResponseBody = {
  errorCode?: string(name='ErrorCode', example='NoPermission'),
  errorMsg?: string(name='ErrorMsg'),
  requestId?: string(name='RequestId', example='717711FB-F887-597B-8121-B77437E89B97'),
  success?: boolean(name='Success', example='True'),
}

model RejectUserSolutionResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: RejectUserSolutionResponseBody(name='body'),
}

async function rejectUserSolutionWithOptions(request: RejectUserSolutionRequest, runtime: Util.RuntimeOptions): RejectUserSolutionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizType)) {
    query['BizType'] = request.bizType;
  }
  if (!Util.isUnset(request.note)) {
    query['Note'] = request.note;
  }
  if (!Util.isUnset(request.solutionBizId)) {
    query['SolutionBizId'] = request.solutionBizId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RejectUserSolution',
    version = '2020-03-06',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function rejectUserSolution(request: RejectUserSolutionRequest): RejectUserSolutionResponse {
  var runtime = new Util.RuntimeOptions{};
  return rejectUserSolutionWithOptions(request, runtime);
}

model ReleaseProduceAuthorizationRequest {
  authorizedUserId?: string(name='AuthorizedUserId', example='1219541161213000'),
  bizId?: string(name='BizId', example='P20211117141528000001'),
  bizType?: string(name='BizType', example='esp.beian_assist'),
}

model ReleaseProduceAuthorizationResponseBody = {
  errorCode?: string(name='ErrorCode', example='200'),
  errorMsg?: string(name='ErrorMsg'),
  requestId?: string(name='RequestId', example='2174AA97-56FB-50FA-B243-0460B9E4CE0C'),
  success?: boolean(name='Success', example='True'),
}

model ReleaseProduceAuthorizationResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ReleaseProduceAuthorizationResponseBody(name='body'),
}

async function releaseProduceAuthorizationWithOptions(request: ReleaseProduceAuthorizationRequest, runtime: Util.RuntimeOptions): ReleaseProduceAuthorizationResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.authorizedUserId)) {
    body['AuthorizedUserId'] = request.authorizedUserId;
  }
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizType)) {
    body['BizType'] = request.bizType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ReleaseProduceAuthorization',
    version = '2020-03-06',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function releaseProduceAuthorization(request: ReleaseProduceAuthorizationRequest): ReleaseProduceAuthorizationResponse {
  var runtime = new Util.RuntimeOptions{};
  return releaseProduceAuthorizationWithOptions(request, runtime);
}

model StartBackToBackCallRequest {
  bizId?: string(name='BizId', example='20211203180209000001'),
  bizType?: string(name='BizType', example='test'),
  callCenterNumber?: string(name='CallCenterNumber', example='02131584184'),
  caller?: string(name='Caller', example='13162828888'),
  mobileKey?: string(name='MobileKey', example='mobile1'),
  skillType?: long(name='SkillType', example='1'),
}

model StartBackToBackCallResponseBody = {
  data?: boolean(name='Data', example='True'),
  errorCode?: string(name='ErrorCode', example='NoPermission'),
  errorMsg?: string(name='ErrorMsg'),
  requestId?: string(name='RequestId', example='2174AA97-56FB-50FA-B243-0460B9E4CE0C'),
  success?: boolean(name='Success', example='True'),
}

model StartBackToBackCallResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: StartBackToBackCallResponseBody(name='body'),
}

async function startBackToBackCallWithOptions(request: StartBackToBackCallRequest, runtime: Util.RuntimeOptions): StartBackToBackCallResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizType)) {
    query['BizType'] = request.bizType;
  }
  if (!Util.isUnset(request.callCenterNumber)) {
    query['CallCenterNumber'] = request.callCenterNumber;
  }
  if (!Util.isUnset(request.caller)) {
    query['Caller'] = request.caller;
  }
  if (!Util.isUnset(request.mobileKey)) {
    query['MobileKey'] = request.mobileKey;
  }
  if (!Util.isUnset(request.skillType)) {
    query['SkillType'] = request.skillType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'StartBackToBackCall',
    version = '2020-03-06',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function startBackToBackCall(request: StartBackToBackCallRequest): StartBackToBackCallResponse {
  var runtime = new Util.RuntimeOptions{};
  return startBackToBackCallWithOptions(request, runtime);
}

model SubmitIntentionNoteRequest {
  intentionBizId?: string(name='IntentionBizId', example='I20210927144823000001'),
  note?: string(name='Note'),
}

model SubmitIntentionNoteResponseBody = {
  errorCode?: string(name='ErrorCode', example='NoPermission'),
  errorMsg?: string(name='ErrorMsg'),
  requestId?: string(name='RequestId', example='668571EF-1E7E-5435-AA65-4ECFFDDA133F'),
  success?: boolean(name='Success', example='True'),
}

model SubmitIntentionNoteResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SubmitIntentionNoteResponseBody(name='body'),
}

async function submitIntentionNoteWithOptions(request: SubmitIntentionNoteRequest, runtime: Util.RuntimeOptions): SubmitIntentionNoteResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.intentionBizId)) {
    query['IntentionBizId'] = request.intentionBizId;
  }
  if (!Util.isUnset(request.note)) {
    query['Note'] = request.note;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SubmitIntentionNote',
    version = '2020-03-06',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function submitIntentionNote(request: SubmitIntentionNoteRequest): SubmitIntentionNoteResponse {
  var runtime = new Util.RuntimeOptions{};
  return submitIntentionNoteWithOptions(request, runtime);
}

model SubmitSolutionRequest {
  bizType?: string(name='BizType', example='esp.wangwen'),
  intentionBizId?: string(name='IntentionBizId', example='I20211223101045000001'),
  operateType?: string(name='OperateType'),
  solution?: string(name='Solution'),
  userId?: string(name='UserId', example='1219541161213057'),
}

model SubmitSolutionResponseBody = {
  confirmUrl?: string(name='ConfirmUrl', example='https://companyreg.console.aliyun.com/#/intention-notarize?Type=119&bizid=I20220114181457000001'),
  errorCode?: string(name='ErrorCode', example='NoPermission'),
  errorMsg?: string(name='ErrorMsg'),
  requestId?: string(name='RequestId', example='0A3CFCF5-E0C0-5C0B-A2ED-03827F16D85F'),
  solutionBizId?: string(name='SolutionBizId', example='S20211109140729000001'),
  success?: boolean(name='Success', example='True'),
}

model SubmitSolutionResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SubmitSolutionResponseBody(name='body'),
}

async function submitSolutionWithOptions(request: SubmitSolutionRequest, runtime: Util.RuntimeOptions): SubmitSolutionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizType)) {
    query['BizType'] = request.bizType;
  }
  if (!Util.isUnset(request.intentionBizId)) {
    query['IntentionBizId'] = request.intentionBizId;
  }
  if (!Util.isUnset(request.operateType)) {
    query['OperateType'] = request.operateType;
  }
  if (!Util.isUnset(request.solution)) {
    query['Solution'] = request.solution;
  }
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SubmitSolution',
    version = '2020-03-06',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function submitSolution(request: SubmitSolutionRequest): SubmitSolutionResponse {
  var runtime = new Util.RuntimeOptions{};
  return submitSolutionWithOptions(request, runtime);
}

model TransferIntentionOwnerRequest {
  bizId?: string(name='BizId', example='P20210709190452000001'),
  bizType?: string(name='BizType', example='esp.wangwen'),
  personId?: int32(name='PersonId', example='67842'),
  remark?: string(name='Remark'),
}

model TransferIntentionOwnerResponseBody = {
  data?: boolean(name='Data', example='True'),
  errorCode?: string(name='ErrorCode', example='NoPermission'),
  errorMsg?: string(name='ErrorMsg'),
  requestId?: string(name='RequestId', example='717711FB-F887-597B-8121-B77437E89B97'),
  success?: boolean(name='Success', example='True'),
}

model TransferIntentionOwnerResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: TransferIntentionOwnerResponseBody(name='body'),
}

async function transferIntentionOwnerWithOptions(request: TransferIntentionOwnerRequest, runtime: Util.RuntimeOptions): TransferIntentionOwnerResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizType)) {
    query['BizType'] = request.bizType;
  }
  if (!Util.isUnset(request.personId)) {
    query['PersonId'] = request.personId;
  }
  if (!Util.isUnset(request.remark)) {
    query['Remark'] = request.remark;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'TransferIntentionOwner',
    version = '2020-03-06',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function transferIntentionOwner(request: TransferIntentionOwnerRequest): TransferIntentionOwnerResponse {
  var runtime = new Util.RuntimeOptions{};
  return transferIntentionOwnerWithOptions(request, runtime);
}

model TransferProduceOwnerRequest {
  bizId?: string(name='BizId', example='P20210208152920000001'),
  bizType?: string(name='BizType', example='esp.companyreg_cloud'),
  personId?: int32(name='PersonId', example='15565'),
  remark?: string(name='Remark'),
}

model TransferProduceOwnerResponseBody = {
  data?: boolean(name='Data', example='True'),
  errorCode?: string(name='ErrorCode', example='NoPermission'),
  errorMsg?: string(name='ErrorMsg'),
  requestId?: string(name='RequestId', example='DD5639FF-1240-51DE-9BA8-2075670A1EAC'),
  success?: boolean(name='Success', example='True'),
}

model TransferProduceOwnerResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: TransferProduceOwnerResponseBody(name='body'),
}

async function transferProduceOwnerWithOptions(request: TransferProduceOwnerRequest, runtime: Util.RuntimeOptions): TransferProduceOwnerResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizType)) {
    query['BizType'] = request.bizType;
  }
  if (!Util.isUnset(request.personId)) {
    query['PersonId'] = request.personId;
  }
  if (!Util.isUnset(request.remark)) {
    query['Remark'] = request.remark;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'TransferProduceOwner',
    version = '2020-03-06',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function transferProduceOwner(request: TransferProduceOwnerRequest): TransferProduceOwnerResponse {
  var runtime = new Util.RuntimeOptions{};
  return transferProduceOwnerWithOptions(request, runtime);
}

